package ui;

import sun.audio.AudioPlayer;
import sun.audio.AudioStream;

import javax.swing.*;
import java.io.FileInputStream;

public class PlayAudio extends JApplet {
    public static void play(String filePath){
        try {
            FileInputStream fileau = new FileInputStream(filePath);
            AudioStream as = new AudioStream(fileau);
            AudioPlayer.player.start(as);
        }catch(Exception e){
            e.printStackTrace();
        }
    }

}
